package com.atguigu.spring5.aopanno;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

// @Configuration 作为配置类，替代xml配置文件
@Configuration
// @ComponentScan 开启组件扫描
// 替代  <context:component-scan base-package="com.atguigu.spring5.aopanno"></context:component-scan>
@ComponentScan(basePackages = {"com.atguigu.spring5.aopanno"})
// 开启Aspect生成代理对象
// 替代 <aop:aspectj-autoproxy></aop:aspectj-autoproxy>
// proxyTargetClass 写出来，不加=，默认值为true；proxyTargetClass不写出来，默认为false
@EnableAspectJAutoProxy(proxyTargetClass = true)
public class ConfigAop {
}
